package com.yanqu.road.server.logic.activity.condition.shushan;

import com.yanqu.road.entity.activity.ActivityConditionInfo;
import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.entity.enums.eGamePlayerEventType;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.task.TaskModule;
import com.yanqu.road.server.logic.activity.BaseActivityData;
import com.yanqu.road.server.logic.activity.condition.BaseNewRankActivityCondition;

/**
 * @Description
 * @Author cwq
 * @Data 2022/3/15 11:32
 */
public class ShuShanMaxMagicUserRankCondition extends BaseNewRankActivityCondition {

    public ShuShanMaxMagicUserRankCondition(ActivityInfo activityInfo, ActivityConditionInfo activityConditionInfo, BaseActivityData baseActivityData) {
        super(activityInfo, activityConditionInfo, baseActivityData);
    }


    @Override
    protected void player_BoardLevelHandle(Object object) {
//        long args = (long) object;
//        BigInteger score = BigInteger.valueOf(args);
//        if (score.compareTo(getValue()) > 0) {
//            setValue(score);
//            //重新生成排行榜
//            rankChange();
//        }
    }

    @Override
    public void addTrigger(GamePlayer player) {
        player.getModule(TaskModule.class).getGameEvent().addListener(eGamePlayerEventType.ShuShanMaxMagicUserRank.getValue(), handle);
    }

    @Override
    public void removeTrigger(GamePlayer player) {
        player.getModule(TaskModule.class).getGameEvent().removeListener(eGamePlayerEventType.ShuShanMaxMagicUserRank.getValue(), handle);
    }
}
